#pragma once
#include <thread>
#include <vector>
#include <mutex>
#include "WuDong.h"
#include <windows.h>
#include "BaseTask.h"
#include "PlayMonsterTask.h"
#include "LowLevelTask.h"
class TaskThread
{
public:
    TaskThread(long hwnd, std::wstring path);

    bool start();

    void stop();

    void addTask(std::shared_ptr<BaseTask>);

private:
    void run();

public:
    WuDong m_wudong;

private:
    HWND m_bindWnd;
    std::thread m_thread;
    bool m_bRunning;

    std::condition_variable m_cv;
    std::mutex m_mutex;
    std::vector<std::shared_ptr<BaseTask>> m_tasks;
};